program OD;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  a,b,c,m,i,am,bm,cm: integer;
begin
  readln(a);
  readln(b);
  readln(c);
  if (a>=b) then
    if (b>=c) then
      m:=c
    else
      m:=b
  else
    if (a>=c) then
      m:=c
    else
      m:=a;
  for i:=1 to m do
  begin
    am:=a mod i;
    bm:=b mod i;
    cm:=c mod i;
    if (am+bm+cm=0) then
      writeln(i);
  end;
readln;
  { TODO -oUser -cConsole Main : Insert code here }
end.
 